package com.ysh.springdemo;


import org.springframework.web.bind.annotation.*;

@RequestMapping("/user")
@RestController
public class UserController2 {
    //既支持get,又支持post
    @RequestMapping("/m1")
    public String m1(){
        return "Hello,m1";
    }

    @RequestMapping(path = "/m2",method = RequestMethod.GET)
    public String m2(){
        return "Hello,m2";
    }
    @GetMapping("/m3")
    public String m3(){
        return "Hello,m3";
    }
    @PostMapping("/m4")
    public String m4(){
        return "Hello,m3";
    }
    @RequestMapping("/r1")
    public String r1(String keyWord){
        return "接受参数"+keyWord;
    }

    public void testLombok(){
        /*MessageInfo info = new MessageInfo();
        info.getTo();*/
        MessageInfo info = new MessageInfo();
        /*info.getTo();*/
        //info.setAge(1);
    }
}
